<?php

$db_host = "localhost";	//---- Database host(usually localhost).
$db_user = "root";	//---- Your database username.
$db_pass = "";	//---- Your database password.
$db_name = "datashop";	//---- Your database name.

$link = mysql_connect($db_host,$db_user,$db_pass);

mysql_select_db($db_name);

?>
<?
function fewchars($s, $lenght) 
			{
			  if ($s=='' || $s==NULL) return $s;
			if (is_array($s)) return $s;
			$s = strip_tags(trim($s));
				if(strlen($s) >= $lenght  && ($espacio = strpos($s, " ", $lenght ))) {
			$s = substr($s, 0, $espacio).'...';
				}
			return $s;
			}
?>